package com.bank.user.service.impl;

import com.bank.model.entity.Role;
import com.bank.user.service.RoleService;
import com.bank.user.util.MapperFactory;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.image.ImageProducer;

/**
 * @author callumEm
 * @version 1.0
 * @create 2023/4/20 21:39
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    MapperFactory mapperFactory;

    @Override
    public Role queryRole(String roleName) {
        QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("name",roleName);
        return mapperFactory.getRoleMapper().selectOne(queryWrapper);
    }
}
